package cn.dinghu.pro.service.impl;

import cn.dinghu.pro.entity.Admin;
import cn.dinghu.pro.entity.User;
import cn.dinghu.pro.mapper.AdminMapper;
import cn.dinghu.pro.mapper.UserMapper;
import cn.dinghu.pro.service.IAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 管理员表 服务实现类
 * </p>
 *
 * @author dinghu
 * @since 2025-10-14
 */
@Service
public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements IAdminService {
    @Autowired
    private AdminMapper adminMapper;
    @Override
    public Admin login(String username, String password) {
        Admin admin = null;
        try {
            admin = adminMapper.doLogin(username,password);
        } catch (Exception e) {
            e.printStackTrace();
            log.error(e.getMessage());
        }
        return admin;
    }
}
